home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / TCL / AMReminder / zAMReminderApp.cp < prev    next >
Text File  |  1996-03-19  |  2KB  |  117 lines

  1. /* zAMReminderApp.cp -- application methods */
  2. /* Created 01/01/95 12:01 PM by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, AMReminderApp.  The 'z' prefix on this module marks    */
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <Global.h>
  14. #include <CBartender.h>
  15. #include <CFWDesktop.h>
  16. #include <CWindow.h>
  17. #include "CmdCodes.h"
  18. #include "AMReminderDoc.h"
  19. #include "zAMReminderApp.h"
  20.  
  21. extern OSType             gSignature;
  22. extern CBartender        *gBartender;
  23. extern CDesktop            *gDesktop;
  24.  
  25. #define kExtraMasters        4
  26. #define kRainyDayFund        20480
  27. #define kCriticalBalance    20480
  28. #define kToolboxBalance        20480
  29.  
  30. /*----------*/
  31. void    ZAMReminderApp::IAMReminderApp    (void)
  32. {
  33.     inherited::IApplication (kExtraMasters, kRainyDayFund,
  34.                                     kCriticalBalance, kToolboxBalance);
  35.  
  36.  
  37. } /* IAMReminderApp */
  38.  
  39. /*----------*/
  40. void    ZAMReminderApp::MakeDesktop    (void)
  41. {
  42.     gDesktop = new CFWDesktop;
  43.     ((CFWDesktop *)gDesktop)->IFWDesktop (this);
  44.  
  45. } /* MakeDesktop */    
  46.  
  47. /*----------*/
  48. void    ZAMReminderApp::SetUpMenus    (void)
  49. {
  50.     MenuHandle        macMenu;
  51.  
  52.     inherited::SetUpMenus ();
  53.  
  54.  
  55.  
  56. } /* SetUpMenus */
  57.  
  58. /*----------*/
  59. void    ZAMReminderApp::CreateDocument    (void)
  60. {
  61.     CAMReminderDoc        *theDocument;
  62.  
  63.     theDocument = NULL;
  64.     TRY {
  65.         theDocument = new CAMReminderDoc;
  66.         theDocument->IAMReminderDoc (this, TRUE);
  67.         theDocument->NewFile ();
  68.     } CATCH {
  69.         ForgetObject (theDocument);
  70.     } ENDTRY;
  71.  
  72. } /* CreateDocument */
  73.  
  74. /*----------*/
  75. void    ZAMReminderApp::OpenDocument    (SFReply    *macSFReply)
  76. {
  77.     CAMReminderDoc        *theDocument;
  78.  
  79.     theDocument = NULL;
  80.     TRY {
  81.         theDocument = new CAMReminderDoc;
  82.         theDocument->IAMReminderDoc (this, TRUE);
  83.         theDocument->OpenFile (macSFReply);
  84.     } CATCH {
  85.         ForgetObject (theDocument);
  86.     } ENDTRY;
  87.  
  88. } /* OpenDocument */
  89.  
  90. /*----------*/
  91. void    ZAMReminderApp::DoCommand    (long        theCommand)
  92. {
  93.     short            itemNr;
  94.  
  95.     switch (theCommand) {
  96.         case cmdAbout:
  97.                 itemNr = Alert (1, NULL);
  98.             break;
  99.  
  100.         case cmdDeleteReminder:
  101.             DoDeleteReminder ();
  102.             break;
  103.  
  104.         default:
  105.             inherited::DoCommand (theCommand);
  106.             break;
  107.     } /* switch */
  108.  
  109. } /* DoCommand */
  110.  
  111. //----------
  112. void    ZAMReminderApp::DoDeleteReminder ()
  113. {
  114. }
  115.  
  116. /* zAMReminderApp.cp */
  117.